#include <cstdio>

int main( )
{
    int n, t;
    bool blank = false;
    while ( scanf("%d", &n) != EOF )
    {
        if ( blank )
            printf("\n");
        else
            blank = true;
        t = 0;
        while ( n )
        {
            t += ( n % 10 ) * ( ( n & 1 ) ^ 1 );
            n /= 10;
        }
        printf("%d\n", t);
    }
    return 0;
}
